Conventionally, there are known game apparatuses in which a single user controls a plurality of objects in a virtual world. For example, in a conventional game apparatus, in a virtual world, an action of a player character A, an action of a player character B, a position of lighting, and the like are controlled based on an operation by a user. Specifically, when the user presses a button A, the player character A jumps in the virtual world. When the user presses a button B, the player character B jumps in the virtual world. When the user presses a cross key, an area illuminated by light in the virtual world is shifted toward a direction in which the cross key is pressed.
In the conventional game apparatus, however, the single user is required to operate the plurality of player characters and the lighting by using different operation devices, respectively. Accordingly, the user is required to perform complicated operation, which may cause erroneous operation. Further, it may take a while for the user to get used to the operation.
Accordingly, an object of the exemplary embodiments is to provide a computer-readable storage medium, an information processing system, and an information processing method, which allows a user to easily perform an operation when he/she operates a plurality of objects in a virtual world.
In order to achieve the above-mentioned object, the exemplary embodiments have the following configurations. It should be understood that the scope of the exemplary embodiments is interpreted only by the scope of the claims. In event of any conflict between the scope of the claims and the scope of the description in this section, the scope of the claims has priority.
An example of a configuration of a computer-readable storage medium according to exemplary embodiments has stored therein an information processing program executed on a computer of an information processing apparatus which is capable of displaying an image on a portable display device. The portable display device outputs at least attitude data based on an attitude of a body of the portable display device. The information processing program causes the computer to act as a direction determination section, a first object action control section, a second object action control section, and a display control section. The direction determination section determines, based on the attitude data, whether or not a direction of a predetermined axis set in the portable display device is within a first range. The first object action control section controls an action of a first object arranged in a virtual world, in accordance with the direction of the predetermined axis, when the result of the determination is that the direction of the predetermined axis is within the first range. The second object action control section controls at least an action of a second object arranged in the virtual world, in accordance with the direction of the predetermined axis, when the result of the determination is that the direction of the predetermined axis is outside the first range. The display control section displays, on the portable display device, a first image showing the virtual world including at least the first object and the second object.
The information processing apparatus may be an apparatus for executing a game process and generating an image based on the game process, or may be a versatile apparatus such as a general personal computer. The portable display device may have a size small enough to be carried by a user. Typically, the portable display device may be a display device which allows the user, holding the portable display device with his/her both hands, to view an image displayed thereon. The portable display device may include other components than the section for outputting at least attitude data and the section for displaying the first image, like a terminal device of exemplary embodiments described later, or may not include other components.
According to the above configuration, a user is allowed to perform an operation on the first object and the second object, based on the attitude of a single device. Therefore, the user is allowed to easily perform an operation when he/she operates a plurality of object in the virtual world.
The information processing program may further causes the computer to act as an attitude calculation section. The attitude calculation section calculates an attitude of the portable display device, based on the attitude data. In this case, the direction determination section may determine whether or not the direction of the predetermined axis is within the first range, based on the attitude of the portable display device.
According to the above configuration, it is possible to calculate the attitude of the portable display device by using the attitude data, and control the actions of the first and second objects based on the attitude of the portable display device.
The first object action control section may control the action of the first object, based on a change in the direction of the predetermined axis. The second object action control section may control at least the action of the second object, based on the change in the direction of the predetermined axis.
According to the above configuration, the user is allowed to control the action of the first object and the action of the second object by changing the attitude of the portable display device.
The first object action control section may control the action of the first object such that the greater the change in the direction of the predetermined axis is, the greater the movement of the first object is. The second object action control section may control the action of the second object such that the greater the change in the direction of the predetermined axis is, the greater the movement of the second object is. The movement of the first object (the movement of the second object) may be a movement in which the position of the object changes in the virtual world, or a movement in which the object rotates without changing its position.
According to the above configuration, the user is allowed to control an amount of movement (including an amount of rotation) of the first object and the second object in accordance with the magnitude of change in the attitude of the portable display device.
The first object action control section may control the action of the first object by causing the first object to rotate in accordance with an angle of the predetermined axis. The second object action control section may control the action of the second object by causing the second object to rotate in accordance with the angle of the predetermined axis.
According to the above configuration, the user is allowed to control the action of the first object and the action of the second object in accordance with the angle of the portable display device.
The second object action control section controls the action of the second object in accordance with the direction of the predetermined axis, and controls the action of the first object in accordance with the action of the second object.
According to the above configuration, the user is allowed to perform a control for causing the first object and the second object to move simultaneously, by changing the attitude of the portable display device such that the direction of the predetermined axis is outside the first range.
The second object action control section may control the action of the second object in accordance with the direction of the predetermined axis, and control the action of the first object such that the first object performs the same action as the second object.
According to the above configuration, the user is allowed to cause the first object and the second object to perform the same action, by changing the attitude of the portable display device such that the direction of the predetermined axis is outside the first range.
The direction determination section may set, as the first range, a range within a first angle, and sets, as a second range, a range which is within a second angle larger than the first angle and is outside the first range, and may determine whether or not the direction of the predetermined axis is within the second range. The second object action control section may control the action of the second object by causing the second object to rotate at a first angular velocity in accordance with the direction of the predetermined axis, when the result of the determination is that the direction of the predetermined axis is within the second range, and may control the action of the second object by causing the second object to rotate at a second angular velocity which is lower than the first angular velocity, in accordance with the direction of the predetermined axis, when the result of the determination is that the direction of the predetermined axis is neither in the first range nor in the second range.
According to the above configuration, the speed at which the second object rotates in the virtual world can be controlled based on the attitude of the portable display device.
The direction determination section may set a reference direction with respect to the direction of the predetermined axis, and set, as the first range, a range within the first angle centering around the reference direction, and set, as the second range, a range which is within the second angle centering around the reference direction and is outside the first range.
According to the above configuration, the speed at which the second object rotates in the virtual world can be controlled based on the attitude of the portable display device with respect to the reference direction.
The direction determination section may set a reference direction with respect to the direction of the predetermined axis, and set, as the first range, a range within the first angle centering around the reference direction.
According to the above configuration, the action of the first object is controlled by changing the attitude of the portable display device such that the direction of the predetermined axis set in the portable display device is within a range relatively close to the reference direction, and the action of the second object is controlled by changing the attitude of the portable display device such that the direction of the predetermined axis is within a range relatively distant from the reference direction. Accordingly, the user is allowed to selectively use the operation for controlling the action of the first object and the operation for controlling the action of the second object, depending on an amount of change in the attitude of the portable display device from the reference direction.
The direction determination section may set the reference direction on a predetermined horizontal plane, and set, as the first range, a range within the first angle on the horizontal plane centering around the reference direction.
According to the above configuration, the user is allowed to selectively use the operation for controlling the action of the first object and the operation for controlling the action of the second object, depending on an amount of change in the attitude of the portable display device from the reference direction along the predetermined plane.
The display control section may display, separately from the first image, a second image showing the virtual world on another display device connected to the information processing apparatus.
The other display device is a display device connected to the information processing apparatus, such as a monitor 2 described later. Any type of display device may be used so long as it is separated from the portable display device, and is capable of displaying the second image generated by the information processing apparatus. For example, the other display device may be integrated with (in one housing) the information processing apparatus.
According to the above configuration, an image of the same virtual world, which is different from the image displayed on the portable display device, is displayed on the other display device connected to the information processing device. Therefore, images of the virtual world, which are formed in accordance with different purposes of use, can be displayed on the display devices favorable for the user, respectively.
The display control section may display, on the other display device, as the second image, an image of the virtual world including the first object and the second object, in which the virtual world is viewed from a viewpoint different from the viewpoint of the virtual world of the first image.
According to the above configuration, an image of the virtual world, which is viewed from a viewpoint different from that of the image displayed on the portable display device, is displayed on the other display device connected to the information processing device. Therefore, images formed in accordance with different purposes of use can be displayed on the display devices favorable for the user, respectively.
The display control section may set a viewpoint of the virtual world of the second image, in a position apart from the first object and the second object by a distance longer than the distance from the viewpoint of the virtual world of the first image to the first object and the second object. The display control section may display, on the other display device, as the second image, a range of the virtual world, which is larger than the range of the virtual world shown by the first image.
According to the above configuration, an image of the virtual world, which is larger in display range than the image of the virtual world displayed on the portable display device, is displayed on the other display device connected to the information processing device. Therefore, when providing the user with the state of the virtual world, images suitable for the user's operation can be displayed on the respective display devices.
The display control section may set a viewpoint for generating the second image, in a position in the virtual world from which the first object and the second object are viewed in a manner of bird's eye viewing. The display control section may display, on the other display device, as the second image, an image in which the first object and the second object arranged in the virtual world are viewed in a manner of bird's eye viewing.
According to the above configuration, an image in which the virtual world is viewed in a manner of bird's eye viewing is displayed on the other display device connected to the information processing device. Therefore, when providing the user with the state of the virtual world, images suitable for the user's operation can be displayed on the respective display devices.
The display control section may set a first virtual camera for generating the first image and a second virtual camera for generating the second image, and cause a line-of-sight direction of the second virtual camera in the virtual world to change in accordance with a change in a line-of-sight direction of the first virtual camera in the virtual world.
According to the above configuration, it is possible to realize a display control such that when the direction of the virtual world displayed on the portable display device changes, the direction of the virtual world displayed on the other display device also changes in the same direction.
The display control section may arrange the first virtual camera such that a forward direction of the second object from behind the second object in the virtual world is an imaging direction of the first virtual camera, and arrange the second virtual camera such that a position in the forward direction of the second object in the virtual world is a point of view of the second virtual camera, and the second object is displayed in the second image at a constant position with respect to the point of view. The display control section may control the positions and/or the attitudes of the first virtual camera and the second virtual camera in accordance with the action of the second object.
According to the above configuration, it is possible to realize a display control such that the image of the virtual world displayed on the portable display device and the image of the virtual world displayed on the other display device change in accordance with only the action of the second object.
The attitude calculation section may calculate an attitude of the portable display device with respect to the a predetermined direction in the real space. The direction determination section may determine whether or not the direction of the predetermined axis is within the first range which is set with respect to the predetermined direction in the real space, based on the attitude of the portable display device with respect to the predetermined direction in the real space. When the result of the determination is that the direction of the predetermined axis with respect to the predetermined direction in the real space is within the first range, the first object action control section may control the action of the first object, with reference to a predetermined direction which is set in the virtual world and corresponds to the predetermined direction in the real space, based on the direction of the predetermined axis with respect to the predetermined direction in the real space. When the result of the determination is that the direction of the predetermined axis with respect to the predetermined direction in the real space is outside the first range, the second object action control section may control the action of the second object with reference to the predetermined direction set in the virtual world, based on the direction of the predetermined axis with respect to the predetermined direction in the real space.
According to the above configuration, it is possible to set an action of the object with respect to the direction in the virtual world, which corresponds to the predetermined direction, in accordance with the attitude of the portable display device with respect to the predetermined direction.
The attitude calculation section may calculate, with a direction of gravity in the real space being the predetermined direction, an attitude of the portable display device with respect to the direction of gravity. The direction determination section may set, with the direction of gravity in the real space being the predetermined direction in the real space, the first range with respect to the direction of gravity, and determine whether or not the direction of the predetermined axis is within the first range, based on the attitude of the portable display device with respect to the direction of gravity in the real space. When the result of the determination is that the direction of the predetermined axis is within the first range, the first object action control section may control the action of the first object with reference to the direction of gravity set in the virtual world, based on the direction of the predetermined axis with respect to the direction of gravity in the real space. When the result of the determination is that the direction of the predetermined axis is outside the first range, the second object action control section may control the action of the second object with reference to the direction of gravity set in the virtual world, based on the direction of the predetermined axis with respect to the direction of gravity in the real space.
According to the above configuration, it is possible to set, based on the attitude of the portable display device with respect to the direction of gravity, an action of the object with respect to the same direction of gravity.
The attitude calculation section may calculate at least an attitude in which the portable display device rotates around the direction of gravity in the real space. The direction determination section may set the first range in a horizontal direction with respect to the direction of gravity in the real space, and determines whether or not the direction of the predetermined axis which is projected onto a horizontal plane in the real space is within the first range. When the result of the determination is that the direction of the predetermined axis projected onto the horizontal plane in the real space is within the first range, the first object action control section may control the action of the first object by causing the first object to rotate and/or move along the horizontal direction set in the virtual world, based on the direction of the predetermined axis projected onto the horizontal plane. When the result of the determination is that the direction of the predetermined axis projected onto the horizontal plane in the real space is outside the first range, the second object action control section may control the action of the second object by causing the second object to rotate and/or move along the horizontal direction set in the virtual world, based on the direction of the predetermined axis projected onto the horizontal direction.
According to the above configuration, an operation of rotating and/or moving the first object in the horizontal direction set in the virtual world and an operation of rotating and/or moving the second object in the horizontal direction are realized by turning the portable display device to the left or to the right in the real space.
The attitude calculation section may further calculate an attitude in which the portable display device swings up and down around a horizontal direction perpendicular to the direction of gravity in the real space. The first object action control section may control the action of the first object by causing the first object to rotate and/or move around a horizontal direction which is set in the virtual world and corresponds to the horizontal direction in the real space, based on the attitude in which the portable display device swings up and down around the horizontal direction in the real space, regardless of whether the result of the determination by the direction determination section is positive or negative.
According to the above configuration, an operation of rotating and/or moving the first object around the horizontal direction set in the virtual world is realized by turning the portable display device to the left or to the right in the real space.
The attitude calculation section may calculate at least an attitude in which the portable display device rotates around two axes orthogonal to the predetermined axis, the predetermined axis being a depth direction of a display screen of the portable display device, the depth direction being perpendicular to the display screen on which the first image is displayed. The direction determination section may set the first range around one of the two axes, and determine whether or not the depth direction rotated around the one axis is within the first range. When the result of the determination is that the depth direction is within the first range, the first object action control section may cause the first object to rotate and/or move around an axis of a vertical direction in the virtual world, based on the depth direction rotated around the one axis. When the result of the determination is that the depth direction is outside the first range, the second object action control section may cause the second object to rotate or move around the axis of the vertical direction in the virtual world, based on the depth direction which has rotated around the one axis. The first object action control section may cause the first object to rotate and/or move around the horizontal direction in the virtual world, based on the depth direction rotated around the other axis, regardless of whether the result of the determination by the direction determination section is positive or negative.
According to the above configuration, an operation of rotating and/or moving the first object around the axis of the vertical direction set in the virtual world and an operation of rotating and/or moving the second object around the axis of the vertical direction are realized by causing the portable display device to rotate around one of the two axes orthogonal to the depth direction of the display screen of the portable display device in the real space. Further, an operation of rotating and/or moving the first object around the axis of the horizontal direction set in the virtual world is realized by causing the portable display device to rotate the other of the two axes orthogonal to the depth direction of the display screen of the portable display device in the real space.
The attitude calculation section may calculate at least an attitude in which the portable display device rotates around an axis along a horizontal direction of a display screen of the portable display device and an axis along a vertical direction of the display screen, the axes being orthogonal to the depth direction. The direction determination section may set the first range around the axis along the vertical direction of the display screen, and determine whether or not the depth direction rotated around the axis along the vertical direction is within the first range. When the result of the determination is that the depth direction is within the first range, the first object action control section may cause the first object to rotate and/or move around the axis of the vertical direction in the virtual world, based on the depth direction rotated around the axis of the vertical direction of the display screen. When the result of the determination is that the depth direction is outside the first range, the second object action control section may cause the second object to rotate and/or move around the axis of the vertical direction in the virtual world, based on the depth direction rotated around the axis of the vertical direction of the display screen. The first object action control section may cause the first object to rotate and/or move around the horizontal direction in the virtual world, based on the depth direction rotated around the axis of the horizontal direction of the display screen, regardless of whether the result of the determination by the direction determination section is positive or negative.
According to the above configuration, an operation of rotating and/or moving the first object around the axis of the vertical direction set in the virtual world and an operation of rotating and/or moving the second object around the vertical direction are realized by causing the portable display device to rotate around the axis along the vertical direction of the display screen of the portable display device in the real space.
the information processing program may further cause the computer to act as a correction section. The correction section corrects the direction of the predetermined axis set in the portable display device, by a predetermined angle, in a direction along which a display screen of the portable display device, which faces upward, stands up in a vertical direction. In this case, the direction determination section may determine whether or not the direction of the predetermined axis, which is corrected by the correction section, is within the first range. The first object action control section may control the action of the first object in accordance with the direction of the predetermined axis which is corrected by the correction section. The second object action control section may control the action of the second object in accordance with the direction of the predetermined axis which is corrected by the correction section.
According to the above configuration, the attitude of the portable display device is corrected from the attitude in which the display screen faces upward to the attitude in which the display screen stands up in the vertical direction. Therefore, the user is allowed to operate the portable display device with the display screen of the portable display device facing upward so that he/she can easily view the display screen.
The first object action control section may cause, as the first object, at least a target object which is a target of an attack according to an operation by a user, to move in the virtual world in accordance with the predetermined axis, when the result of the determination is that the direction of the predetermined axis is within the first range. The display control section may include a display range setting section configured to set a display range of the virtual world to be displayed on the portable display device, based on the action of the second object.
According to the above configuration, the target is moved by changing the attitude of the portable display device such that the direction of the predetermined axis set in the portable display device is within the first range, and the display range of the virtual world displayed on the portable display device is shifted by changing the attitude of the portable display device such that the direction of the predetermined axis is outside the first range. Accordingly, the user is allowed to selectively use the operation of moving the target and the operation of shifting the display range, depending on the manner of changing the attitude of the portable display device.
The display range setting section may set the display range based on the action of the second object, by arranging a virtual camera for generating an image of the virtual world such that the first object and the second object are included in the display range, with a forward direction of the second object from behind the second object in the virtual world being a line-of-sight direction of the virtual camera. The display control section may display, on the portable display device, as the first image, an image showing the virtual world viewed from the virtual camera.
According to the above configuration, since the virtual camera is located behind the second object, a realistic image can be displayed on the portable display device.
When the result of the determination is that the direction of the predetermined axis is within the first range, the first object action control section may cause, as the first object, a shooting object which shoots a predetermined object toward the target to rotate in the virtual world in accordance with the direction of the predetermined axis. When the result of the determination is that the direction of the predetermined axis is outside the first range, the second object action control section may cause the second object to rotate integrally with the first object in the virtual world in accordance with the direction of the predetermined axis, and cause the target object to move in the virtual world in accordance with the direction of the shooting object.
According to the above configuration, the direction of the shooting object is changed and the target of the predetermined object to be shot by the shooting object is moved by changing the attitude of the portable display device such that the direction of the predetermined axis set in the portable display device is within the first range. Further, the direction of the second object is changed integrally with the shooting object and the display range of the virtual world displayed on the portable display device is shifted by changing the attitude of the portable display device such that the direction of the predetermined axis is outside the first range.
The portable display device may include at least one of a gyro sensor and an acceleration sensor. In this case, the attitude calculation section may calculate an attitude of the portable display device, based on data outputted from at least one of the gyro sensor and the acceleration sensor.
According to the above configuration, it is possible to accurately calculate an attitude of the portable display device by using data which is output from the gyro sensor and represents an angular velocity that occurs in the portable display device and/or data which is output from the acceleration sensor and represents an acceleration that occurs in the portable display device.
The information processing program may further cause the computer to act as a load obtaining section and an object moving section. The load obtaining section obtains data based on a load applied to the load detection device. The object moving section causes the first object and the second object to move in the direction of the second object in the virtual world, based on the data obtained by the load obtaining section.
The load detection device is, for example, a device which detects a load applied thereto when a user puts at least a part of his/her body thereon, or a device which outputs an on/off signal according to the load. It is considered that, when the user operates the load detection device, the user may stand on the load detection device with his/her bottoms of both feet contacting the upper surface thereof, or the user may put his/her one foot on the upper surface thereof, or the user may put another part (e.g., a hand) of his/her body on the upper surface thereof.
According to the above configuration, it is possible to realize a process of moving the first object and the second object based on an operation performed by the user using the load detection device, and the user is allowed to view the result of the process on the portable display device. Therefore, the user is allowed to view an image displayed on the portable display device while holding the portable display device. Accordingly, the user is allowed to perform an operation in a new operation environment, and allowed to view the result of the process in a situation suited to the operation environment and favorable for the user. Further, since the movement direction of the first object and the second object is the direction of the second object which is set based on the attitude of the portable display device, the first object and the second object can be moved in accordance with the direction to which the portable display device is directed, and therefore, the user is allowed to operate the first object and the second object by moving the portable display device.
The information processing program may further causes the computer to act as a center-of-gravity position calculation section. The center-of-gravity position calculation section calculates a center-of-gravity position of the load applied to the load detection device, based on the data obtained by the load obtaining section. In this case, the object moving section may cause the first object and the second object to move in the direction of the second object, based on the center-of-gravity position calculated by the center-of-gravity position calculation section.
According to the above configuration, the user is allowed to move the first object and the second object along the set movement direction, in accordance with the center-of-gravity position of the load applied to the load detection device by the user. For example, the user is allowed to move the first object and the second object along the set movement direction by performing stepping or shifting the center-of-gravity position of his/her body forward, backward, leftward, or rightward on the load detection device.
The object moving section may set a movement speed of the first object and the second object, based on a distance from a preset reference position to the center-of-gravity position calculated by the center-of-gravity position calculation section, set a forward movement or a backward movement of the first object and the second object, based on the distance from the reference position to the center-of-gravity position, and cause the first object and the second object to move in the direction of the second object.
The object moving section may set, as the reference position, a straight line which divides a part of the load detection device to which the load is applied, into a front part and a rear part, set a movement speed of the first object and the second object, based on a distance from the straight line to the center-of-gravity position calculated by the center-of-gravity position calculation section, set the first object and the second object to a forward movement when the center-of-gravity position is located in the front part with respect to the straight line, and set the first object and the second object to a backward movement when the center-of-gravity position is located in the rear part with respect to the straight line.
According to the above configuration, the user is allowed to move the first object and the second object forward or backward in the direction along the direction of the second object by shifting the center-of-gravity position of the load applied to the load detection device by the user. For example, when the user tilts his/her body so as to put his/her weight forward on the load detection device, the first object and the second object are moved forward along the direction of the second object at a speed according to the amount of the forward shift of the center-of-gravity position. When the user tilts his/her body so as to put his/her weight backward on the load detection device, the first object and the second object are moved backward along the direction opposite to the direction of the second object at a speed according to the amount of the backward shift of the center-of-gravity position.
The display control section may output, to the portable display device, image data representing the first image. The portable display device may include an image data obtaining section and a display section. The image data obtaining section obtains image data outputted from the information processing apparatus. The display section displays the first image represented by the image data obtained by the image data obtaining section.
According to the above configuration, the portable display device functions as a so-called thin client terminal which does not execute information processing.
The information processing program may further cause the computer to act as a compressed image generation section. The compressed image generation section generates compressed image data by compressing the image data representing the first image. In this case, the display control section may output the compressed image data generated by the compressed image generation section to the portable display device. The image data obtaining section may obtain the compressed image data outputted from the information processing apparatus. The portable display device may further include a display image decompression section configured to decompress the compressed image data to obtain image data representing the first display image. The display section may display the first image represented by the image data which has been obtained by the image data obtaining section and decompressed by the display image decompression section.
According to the above configuration, since the first image is compressed and transmitted from the information processing apparatus to the portable display device. Therefore, the first image can be transmitted at a high speed, thereby reducing a delay from when the first image is generated to when the first image is displayed on the portable display device.
The exemplary embodiments may be implemented in the form of an information processing system including the above-mentioned section, or in the form of an information processing method including actions performed by the above-mentioned section.
According to the exemplary embodiments, a user is allowed to easily perform an operation when he/she operates a plurality of objects in a virtual world.
These and other objects, features, aspects and advantages of the exemplary embodiments will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.